// 文章接口
import request from "@/utils/request";
// 上传大文件
export function UploadBigFile(data) {
    return request({
        url: "/api/v1/upload/bigFileUpload",
        method: "post",
        data,
    });
}
// 中断上传视频
export function InterruptUploadVideo(data) {
    return request({
        url: "/api/v1/upload/cancelVideo",
        method: "delete",
        data,
    });
}
// 删除视频
export function DeleteUploadVideo(data) {
    return request({
        url: "/api/v1/upload/remove",
        method: "delete",
        data,
    });
}
// 发布视频
export function PublishVideo(data) {
    return request({
        url: "/api/v1/video/publishVideo",
        method: "post",
        data,
    });
}
// 检查秒传
export function CheckExist(data) {
    return request({
        url: "/api/v1/upload/checkExist",
        method: "post",
        data,
    });
}
// 检查秒传
export function getVideoList(limit, page) {
    return request({
        url: `/api/v1/video/getVideoList/${limit}/${page}`,
        method: "get",
    });
}
// 查看视频
export function readVideo(id) {
    return request({
        url: `/api/v1/video/readVideo/${id}`,
        method: "get",
    });
}
// 刷新视频
export function refreshVideo(id) {
    return request({
        url: `/api/v1/video/refreshVideo/${id}`,
        method: "get",
    });
}
// 视频点赞
export function VideoThumb(data) {
    return request({
        url: `/api/v1/video/like`,
        method: "post",
        data
    });
}
// 查看用户点赞状态
export function getVideoThumbStatus(video_id) {
    return request({
        url: `/api/v1/video/like/status/${video_id}`,
        method: "get",

    });
}
// 获取评论列表
export function getVideoCommentList(video_id, limit, page) {
    return request({
        url: `/api/v1/video/getCommentList/${video_id}/${limit}/${page}`,
        method: "get",

    });
}
// 视频评论点赞
export function addComment(data) {
    return request({
        url: `/api/v1/video/addComment`,
        method: "post",
        data,
    });
}
// 通过作者id获取视频信息
export function getVideoByAuthorId(usr_id, limit, page) {
    return request({
        url: `/api/v1/video/getVideosByAuthor/${usr_id}/${limit}/${page}`,
        method: "get",

    });
}
// 删除指定视频
export function deleteVideo(data) {
    return request({
        url: `/api/v1/video/deleteVideo`,
        method: "delete",
        data,
    });
}
// 获取指定视频的标签
export function getTags(video_id) {
    return request({
        url: `/api/v1/video/getTags/${video_id}`,
        method: "get",

    });
}
// 删除视频评论
export function deleteVideoComment(data) {
    return request({
        url: `/api/v1/comment/deleteVideoComment`,
        method: "delete",
        data,
    });
}
// 通过tagId获取文章
export function getVideoByTagId(tagId, limit, page) {
    return request({
        url: `/api/v1/tag/getVideosByTagId/${tagId}/${limit}/${page}`,
        method: "get",
    });
}
// 修改视频
export function alterVideo(data) {
    return request({
        url: `/api/v1/video/alter`,
        method: "put",
        data,
    });
}